package com.excellent.item.api;

import com.excellent.item.pojo.Category;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author Xxacker
 */

@RequestMapping("category")  //声明全局路径
public interface CategoryApi {
    /*根据父节点 Id 查询子节点*/
    @GetMapping("list")
    public List<Category> queryCategorysByPid(@RequestParam(value = "pid", defaultValue = "0") Long pid);

    /*商品分类名称查询*/
    @GetMapping("names")
    public List<String> queryNamesByIds(@RequestParam("ids")List<Long> ids);
}
